<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改牛奶出库')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncOutputMilk-edit" th:object="${ncOutputMilk}">
            <input id="outputId" name="outputId" th:field="*{outputId}"  type="hidden">
			<input id="cforderId" name="cforderId" th:field="*{cforderId}"  type="hidden">

			<input id="treeId" name="cropVarieties" th:field="*{cropVarieties}" type="hidden">
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">入库id：</label>
				<div class="col-sm-8">
					<input id="inputId" name="inputId" th:field="*{inputId}" class="form-control" type="text">
				</div>
			</div>-->
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">菜房订单id：</label>
				<div class="col-sm-8">
					<input id="cforderId" name="cforderId" th:field="*{cforderId}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">批次：</label>
				<div class="col-sm-8">
					<input id="cforderCode" name="cforderCode"  readonly="true" th:field="*{cforderCode}" class="form-control" type="text">
				</div>
			</div>

			<!--<div class="form-group">
				<label class="col-sm-3 control-label">种类</label>
				<div class="col-sm-8">
					<input class="form-control"  name="cropVarietiesCn" th:field="*{cropVarietiesCn}" type="text" required onclick="selectCaiTree()"
						   id="treeName" readonly="true">

					&lt;!&ndash;<input id="cropNameCn" name="cropNameCn" th:field="*{cropNameCn}" class="form-control" type="text">&ndash;&gt;
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">需求数量：</label>
				<div class="col-sm-8">
					<input id="requestAmount" name="requestAmount" th:field="*{requestAmount}" class="form-control" type="number">
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">实际提供数量（kg）：</label>
				<div class="col-sm-8">
					<input id="outputAmout" name="outputAmout" th:field="*{outputAmout}" class="form-control" type="number">
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">瓶数：</label>
				<div class="col-sm-8">
					<input id="bottleAmount" name="bottleAmount" th:field="*{bottleAmount}" class="form-control" type="text">
				</div>
			</div>-->



			<!--<div class="form-group">
				<label class="col-sm-3 control-label">出库时间：</label>
				<div class="col-sm-8">
					<input type="text" style="height: 34px;" data-format="yyyy-MM-dd HH:mm:ss" readonly="true" th:value="*{#dates.format(outputTime, 'yyyy-MM-dd HH:mm:ss')}" name="outputTime" class="time-input" id="outputTime" />


					&lt;!&ndash;<input id="outputTime" name="outputTime" th:field="*{outputTime}" class="form-control" type="text">&ndash;&gt;
				</div>
			</div>
			&lt;!&ndash;<div class="form-group">
				<label class="col-sm-3 control-label">出库类型 ：字典：</label>
				<div class="col-sm-8">
					<input id="outputType" name="outputType" th:field="*{outputType}" class="form-control" type="text">
				</div>
			</div>&ndash;&gt;
			<div class="form-group">
				<label class="col-sm-3 control-label">出库经手人：</label>
				<div class="col-sm-8">
					<input id="outputUser" name="outputUser" th:field="*{outputUser}" class="form-control" type="text">
				</div>
			</div>-->
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">创建者：</label>
				<div class="col-sm-8">
					<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">创建时间：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" rows="3" name="remark" th:field="*{remark}" class="form-control" row="4" type="text"></textarea>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/ncOutputMilk";
		var cai_prefix = ctx + "system/cai";
		$("#form-ncOutputMilk-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-ncOutputMilk-edit').serialize());
	        }
	    }


		/*蔬菜管理-新增-选择父蔬菜树*/
		function selectCaiTree() {
			var options = {
				title: '蔬菜选择',
				width: "380",
				url: cai_prefix + "/selectCaiTree/" + $("#treeId").val(),
				callBack: doSubmit
			};
			$.modal.openOptions(options);
		}

		function doSubmit(index, layero) {
			var body = layer.getChildFrame('body', index);
			$("#treeId").val(body.find('#treeId').val());
			$("#treeName").val(body.find('#treeName').val());
			layer.close(index);
		}
	</script>
</body>
</html>
